<template>
  <el-container>
    <el-header>
      <el-menu
        mode="horizontal"
        default-active="/"
        @select="handleSelect"
        router
      >
        <el-menu-item v-for="item in menuList" :key="item.path" :index="item.path">{{item.title}}</el-menu-item>
      </el-menu>
    </el-header>
    <el-main>
      <router-view></router-view>
    </el-main>
  </el-container>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      menuList: [
        {
          title: '首页',
          path: '/',
        },
        {
          title: '关于',
          path: '/about',
        },
        {
          title: '用户',
          path: '/users',
        },
      ],
    }
  },
  methods: {
    handleSelect() {}
  }
}
</script>

<style>

</style>
